using Rainfall.WebRequest;
using System;
using UnityEngine;
using Yzq.Managers;


[Serializable]
public class PauseRequest
{
	public string test;
	public PauseRequest(string test)
    {
        this.test = test;
    }
}

[Serializable]
public class PauseResponse
{
	public string code;
	public string msg;
}

public class C0102_HttpPostPauseGame : C0101_HttpPostBase<PauseRequest, PauseResponse>
{
	public override string ServerUrl => "127.0.0.1:5000/pause";

	public C0102_HttpPostPauseGame() {
        OnPostSucceed += HandlePostSucceed;
        this.request = new PauseRequest("66");
    }

    public void Post()
	{
		StartPostByMono(A0202_GlobalModuleManager.GetRegisteredModule<A0302_RuntimeFrameRateManager>());
	}

	private void HandlePostSucceed(PauseResponse response)
	{
		Debug.Log("your pause request --> "+response.code);
		Debug.Log("Pause succeeded msg: " + response.msg);
	}
}
